home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / gets.man < prev    next >
Encoding:
Text File  |  1989-01-04  |  1.4 KB  |  67 lines

  1.  
  2.  
  3.  
  4. GETS                  C Library Procedures                   GETS
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      gets, fgets - get a string from a stream
  10.  
  11. SSYYNNOOPPSSIISS
  12.      ##iinncclluuddee <<ssttddiioo..hh>>
  13.  
  14.      cchhaarr **ggeettss((ss))
  15.      cchhaarr **ss;;
  16.  
  17.      cchhaarr **ffggeettss((ss,, nn,, ssttrreeaamm))
  18.      cchhaarr **ss;;
  19.      FFIILLEE **ssttrreeaamm;;
  20.  
  21. DDEESSCCRRIIPPTTIIOONN
  22.      _G_e_t_s reads a string into _s from the standard input stream
  23.      ssttddiinn.  The string is terminated by a newline character,
  24.      which is replaced in _s by a null character.  _G_e_t_s returns
  25.      its argument.
  26.  
  27.      _F_g_e_t_s reads _n-1 characters, or up through a newline charac-
  28.      ter, whichever comes first, from the _s_t_r_e_a_m into the string
  29.      _s.  The last character read into _s is followed by a null
  30.      character.  _F_g_e_t_s returns its first argument.
  31.  
  32. SSEEEE AALLSSOO
  33.      puts(3S), getc(3S), scanf(3S), fread(3S), ferror(3S)
  34.  
  35. DDIIAAGGNNOOSSTTIICCSS
  36.      _G_e_t_s and _f_g_e_t_s return the constant pointer NNUULLLL upon end of
  37.      file or error.
  38.  
  39. BBUUGGSS
  40.      _G_e_t_s deletes a newline, _f_g_e_t_s keeps it, all in the name of
  41.      backward compatibility.
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0               May 15, 1985                          1
  64.  
  65.  
  66.  
  67.